<template>
	<view class="index">
		<image class="index-img" :src="imgUrl" mode=""></image>
		<view class="index-text">一款专门为酒店客房定制的人才输入平台—用工无忧。</view>
		<view class="index-butt">
			<button class='but' plain @click="okClick('企业端')">企业端登录</button>
			<button class='but but1' plain @click="okClick('员工端')">员工端登录</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				imgUrl:`${getApp().globalData.imgScr}jd/logo.png`,
				SessionKey: '',
				OpenId: '',
				nickName: null,
				avatarUrl: null,
				isCanUse: uni.getStorageSync('isCanUse')||true//默认为true
			}
		},
		onInit(res){
			console.log('22')
			console.log('openid',res.openid)
		},
		onLoad(res) {
			console.log('1')
			console.log('openid',res.openid)
		},
		methods: {
			okClick(i) {
				switch(i) {
					case '企业端':
					uni.showToast({
						title:`${i}登录`,
						icon:'none'
					})
					uni.switchTab({ url: '/pages/tag/my/my' })
					break
					case '员工端':
					uni.showToast({
						title:`${i}登录`,
						icon:'none'
					})
					uni.reLaunch({ url:'/cleaningAdmin/home/home' })
					break
				}
				
			},
		},
		onLoad() {
			 // this.login()
		}
	}
</script>

<style lang="scss">
.index {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	height: 100vh;
	overflow: hidden;
	.index-img {
		width: 230rpx;
		height: 230rpx;
		margin-bottom: 80rpx;
	}
	.index-text {
		width: 410rpx;
		text-align: center;
		font-size: 34rpx;
		font-weight: 600;
		color: #28292c;
		margin-bottom: 200rpx;
	}
	.index-butt {
		.but {
			font-size: 34rpx;
			width: 560rpx;
			font-weight: 500;
			color: #FFFFFF;
			background: linear-gradient(-90deg, #8dc9f1, #d8eefc);
			border-radius: 48rpx;
			line-height: 96rpx;
			border: 0;
		}
		.but1 {
			background: linear-gradient(-90deg, #48AEEC, #5EBFF8);
			margin-top: 40rpx;
		}
	}
}
</style>
